<h1>Current Orders</h1>
<%= will_paginate @orders %>
<%= render :partial => 'navigation' %>
<table>
	<tr>
		<th>ID</th>
		<th>Status</th>
		<th>Total amount</th>
		<th># Items</th>
		<th>Created at</th>
		<th>Updated at</th>
		<th>Last updated by</th>
		<th></th>
	</tr>
<% for order in @orders %>
	<tr>
		<td align="right"><%= order.id %></td>
		<td align="right"><%= order.status %></td>
		<td align="right">$<%= sprintf("%0.2f", order.total) %></td>
		<td align="right"><%= order.artworks.size %></td>
		<td align="right"><%= order.created_at.strftime("%Y-%m-%d %I:%M") %></td>
		<td align="right"><%= order.updated_at.strftime("%Y-%m-%d %I:%M") %></td>
		<td align="right"><%= order.last_edited_by %></td>
		<td><%= link_to "Details", {:action => 'show', :id => order} %></td>
	</tr>
<% end %>
</table>
<%= will_paginate @orders, :class => "pagination_bottom" %>


